#ifndef _BLE_H_
#define _BLE_H_

#include <NimBLEDevice.h>
#include <NimBLEAdvertisedDevice.h>

extern NimBLEServer* pServer;
extern NimBLEService* pService;
extern NimBLECharacteristic* pStateChar;
extern NimBLECharacteristic* pControlChar;
extern NimBLEAdvertising *pAdvertising;
extern NimBLECharacteristic *pledstatChar; 

extern bool is_ble_connected;
extern NimBLEScan* pScan;



void ble_init();
void notify_state_change(uint8_t relay_num, bool state);
void set_ble_name(std::string& name);
void is_scan_star();
void scan_stop();
std::string get_Characteristic_data(NimBLECharacteristic *pchar);

#endif
